<template>
  <div>
    <list :memberArr="memberArr" @updataMember="updataMember"></list>
    <forms :obj="obj" ref="curId" @updata="updata" @canle="canle"></forms>
  </div>
</template>

<script>
import list from "./list.vue";
import forms from "./form.vue";
import { memberlist } from "../../request/api.js";
export default {
  components: {
    list,
    forms,
  },
  data() {
    return {
      memberArr: [],
      obj: {
        isshow: false,
      },
    };
  },
  methods: {
    canle() {
      this.obj.isshow = false
    },
    updata() {
      this.obj.isshow = false;
      this.getMemberList();
    },
    updataMember(uid) {
      this.obj.isshow = true;
      this.$refs.curId.getMemberInfo(uid);
    },
    getMemberList() {
      memberlist().then((d) => {
        if (d.data.code == 200) {
          this.memberArr = d.data.list;
          // console.log(this.memberArr);
        }
      });
    },
  },
  mounted() {
    this.getMemberList();
  },
};
</script>

<style>
</style>